<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@page import="model.JsfStaff"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<title>所有健身器材</title>
</head>
<body>
<%
	JsfStaff staff = (JsfStaff) session.getAttribute("staff");
	int ps = staff.getStatus();
%>
<table>
		<tr>
			<td width="150">编号</td>
			<td width="150">名称</td>
			<%if( ps == 1 ){  %>
			<td width="150">操作</td>
			<%} %>
		</tr>
		<s:iterator value="equipmentlist" var="var">
			<tr>
				<td width="150"><a href="equipment_findById?equipmentId=<s:property value="#var.id" />"> 
				<s:property value="#var.id" /> </a>
				</td>
				<td width="150"><s:property value="#var.name" /></td>
				<%if( ps == 1 ){  %>
					<td width="150">
					<input type="button" value="修改" class="btn btn-success"
					onclick="location.href ='equipment_findById?equipmentId=<s:property value="#var.id"/>&level=2';" />
				
					<input type="button" value="删除" class="btn btn-warning"
					onclick="if(confirm('确定删除？'))location.href ='equipment_delById?equipmentId=<s:property value="#var.id"/>';" />
					</td>
				<%} %>
			</tr>
		</s:iterator>
	</table>
</body>
</html>